import EventHub from '/utils/event-emitter'
Page({
  data: {
    str: ''
  },
  onLoad() {
     EventHub.addEventListener('reLaunchToHomePage', (payload) => {
      // 根据插件返回的数据，更新当前页面
    console.log(payload,"===========")
    })
    const app = getApp();
    if (app.globalData.pluginRelaunchPayload) {
      this.setData({
        str: JSON.stringify(app.globalData.pluginRelaunchPayload),
      })
    }
  },
  nav() {
    my.navigateTo({
      url: '/pages/index/index'
    });
  },
});
